    /*
     * function showStr(str)
     * {
     *     var xmlhttp;
     *     if (window.XMLHttpRequest)
     *     {
     *         xmlhttp = new XMLHttpRequrst();
     *     }
     *     xmlhttp.onreadystatechange=function()
     *     {}
     * }
     */

function loadXMLDoc(url)
{
    var xmlhttp;
    if (window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest();
    }
    xmlhttp.onreadystatechange=function()
    {
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
            document.getElementById("A1").innerHTML=xmlhttp.status;
            document.getElementById("A2").innerHTML=xmlhttp.statusText;
            document.getElementById("A3").innerHTML=xmlhttp.responseText;
            document.getElementById("A4").innerHTML=xmlhttp.getAllResponseHeaders();
            document.getElementById('A5').innerHTML="Last modified:" + xmlhttp.getResponseHeader('Last-Modified');
        }
    }
    xmlhttp.open("GET",url,true);
    xmlhttp.send();
}

$.validator.setDefaults({
    submitHandler: function() {
        alert("提交事件!");
    }
});
$().ready(function() {
        $("#commentForm").validate();
});

function showPeople(str)
{
    var xmlhttp;
    if (str=="")
    {
        document.getElementById("people").innerHTML="";
        return;
    }
    if (window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest();
    }
    xmlhttp.onreadystatechange = function()
    {
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
            document.getElementById("people").innerHTML=xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET","/ajax/app/getsql.php?q="+str,true);
    xmlhttp.send();
}

function loadCD()
{
    var xml = new XMLHttpRequest();
    xml.onreadystatechange = function () {
        if (this.readyState == 4 && this.status == 200) {
            myFunction(this);
        }
    };
    xhttp.open('GET','./cd_catalog.xml');
    xhttp.send();
}
